<?php
/**
 * Read roles
 *
 * @author     Mario Schillermann <info@rockit-flash.com>
 * @encoding   UTF-8 äöüßÖÄÜ
 * @copyright  © 2011 Mario Schillermann (info@rockit-flash.com)
 * @license    GNU GPL v2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @uses       Zend_Db_Table_Abstract
 * @category   Module
 * @package    User
 * @subpackage Model
 * @todo
 */

class User_Model_Role extends Zend_Db_Table_Abstract
{
    /**
     * Get role list
     * 
     * @return array role list
     */
    public function getList()
    {
        $query = $this->_db->select()
                           ->from("access_roles",
                                  array("id", "role"));

        $result = $this->_db->fetchAll($query);

        foreach ($result as $value) {
            $roleList[$value["id"]] = $value["role"];
        }
        return $roleList;
    }
}